package com.wenjie.common.enumHandler;

import com.wenjie.common.unifiedReturn.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@Slf4j
@RestControllerAdvice
public class EnumExceptionHandler {
    /**
     * @Description 登录异常处理
     * @author wenjie
     * @date 2024/6/11 9:57
     */
    @ExceptionHandler(EnumException.class)
    public Result loginException(EnumException ex) {
        ex.printStackTrace();
        return Result.fail(ex.getMessage());
    }


}
